extends NodeState

# 凌空抽射

var player: Player:
	get:
		return state_matchine.root as Player



func _on_process(_delta : float) -> void:
	pass



func _on_enter(_data: NodeStateData) -> void:
	_process_animation()

	player.ball.shoot(player.shooting_power * player.volley_kick_power_factor,
						player.shooting_power * player.volley_kick_power_factor,
						player.offensive_goal.get_random_target_direction(player),
						player.ball.height)


func _on_exit() -> void:
	pass



func _process_animation():
	player.animation_player.play(Player.ANIMATION_VOLLEY_KICK)



func on_animation_finished():
	transition_state(Player.STATE_RECOVERING)
